package week1;

import java.util.Scanner;

public class T2 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String input1=scanner.nextLine();
        String[] data=input1.split(" ");
        int n=Integer.parseInt(data[0]);
        int target=Integer.parseInt(data[1]);


        Scanner scanner3=new Scanner(System.in);
        String input=scanner3.nextLine();
        String[] elements=input.split(" ");
        int[] array=new int[elements.length];
        for (int i=0;i<elements.length;i++){
            array[i]=Integer.parseInt(elements[i]);
        }

        //find
        for(int i=0;i<n;i++){
            for (int j=i+1;j<n;j++){
                if(array[i]+array[j]==target)
                {
                    System.out.println("["+i+","+j+"]");
                }
            }
        }






    }
}
